<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script src="vue/vue.js"></script>
		<script src="js/axios.min.js"></script>
		<link rel="stylesheet" type="text/css" href="CSS/bootstrap.css"/>
		<title>SSM测试</title>
	</head>
	<body>
		<h1>京淘电商平台</h1>
		<div id="app">
			<table class="table table-hover">
				<thead>
					<th></th>
					<th>名称</th>
					<th>价格</th>
					<th>卖点</th>
				</thead>
				<thead v-for="item in msg">
					<th><img :src="item.image"></th>
					<th>{{item.title}}</th>
					<th>{{item.price}}</th>
					<th>{{item.sellPoint}}</th>
				</thead>
			</table>
		</div>
	</body>

	<script type="text/javascript">
		new Vue({
			el:"#app",
			data:{
				msg:"Hi Vue",
				num:100
			},
			mounted(){
				axios({
					method:"post",
					url:"http://localhost:8080/item/search?num="+this.num
				})
				.then(
					response=>{
						console.log(response.data)
						this.msg=response.data
					}
				)
			}
		})
	</script>
</html>
